// pages/my/my.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        mgs:'',
        list:[],
        
    },
    handleInput(e){
        const { value } = e.detail
        this.setData({
            mgs:value
        })
    },
    clickFn(){
        const mgs = this.data.mgs
        this.setData({
            list: this.data.list.concat(mgs)
        })
    },
    del(e){
        const id = e.currentTarget.dataset.id
        const arr = this.data.list
        arr.splice(id,1)
        this.setData({
            list:arr
        })
    }

})